<?php

namespace app\common\model;

use think\Model;
use think\Request;
use traits\model\SoftDelete;

class Follow extends Model
{
    use SoftDelete;
    // 表名
    protected $name = 'follow';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'datetime';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false; // 没有 updatetime 字段

    protected $deleteTime = 'deletetime';

     public function customer()
    {
        return $this->belongsTo('app\\common\\model\\Customer', 'customer_id', 'id');
    }
    public function user()
    {
        return $this->belongsTo('app\\common\\model\\User', 'user_id', 'id');
    }
    public function staff()
    {
        return $this->belongsTo('app\\common\\model\\User', 'staff_id', 'id');
    }

}